<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 原型
        // Array.prototype.sayName = function () {
        //     console.log("大家好")
        // }



        // var a = []
        // // console.log(a)
        // // 构造原型
        // // console.log(Array.prototype)
        // // console.log(a.__proto__)
        // a.sayName()


        function Fn() {

        }

        Fn.prototype.sayHello = function () {
            console.log(this)
        }


        var a = new Fn()

        console.log(a)
        a.sayHello()
    </script>
</body>

</html>